Reverse Literate Programming

نویسنده

  • Markus Knasmüller
چکیده

Knuth’s Literate Programming system allows an author to design and describe a program hierarchically according to the method of stepwise refinement. The result is source code, which can be read sequentially like a book, section after section. This helps when reading printed source code, but on screen source code is read rather selectively like an encyclopedia. There the programmer wants a system which allows, possibly even encourages, selective browsing; zoom in at interesting points; jump to other locations according to control flow or other semantic relationships. This is the approach chosen by hypertext systems. In this paper, we demonstrate a solution, called Reverse Literate Programming, which combines the advantages of Knuth’s method and of the hypertext approach. We implemented active text elements making it possible to have the source code as a hypertext screen document. A special command prints this document as a Literate Program, i.e. an essay, including documentation, pictures, and program code. The implementation was done in the Oberon system which offers powerful mechanisms for extending software in an object-oriented way. 1 . Introduction When developing or reusing software components, one is often forced to study source code. In many cases this code contains only little or even no design information, which makes it hard to read and understand it. This is the main reason, why software maintenance costs dominate over all other life-cycle costs. Standish (1984), for example, discovered, that the time needed to understand source code, causes 50 to 90 percent of the maintenance costs. Therefore high software quality, in form of readable source code, is the best way to save time and money for new developments. During the last years, different tools for constructing readable and maintainable code were suggested. One of these approaches, Literate Programming by Donald E. Knuth (1984), allows an author to design and describe a program hierarchically according to the method of stepwise refinement. The result is source code, which can be read sequentially like a book, section after section. This helps while reading the printed source code of a program. On the other hand, on screen programs are usually read rather selectively like an encyclopedia. The programmer does not want to have the source code in book form, but rather the opposite: a system which allows, possibly even encourages, selective browsing. Zoom in at interesting points or jump to other

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Thirty Years of Literate Programming and More?

Don Knuth created Literate Programming about thirty years ago. It could be called a methodology, discipline, paradigm, . . . Bentley’s “Programming Pearls” article about Knuth’s book, TEX: The Program, caused a huge stir in the computing professions. Soon there was announcement of a Literate Programming section for the CACM . Several “Literate Programming systems” quickly appeared. This was fol...

متن کامل

An Elucidative Programming Environment for Scheme (Incomplete Draft)

In this paper we describe a programming environment for Scheme that supports elucidative programming. Scheme is a programming language in the Lisp family. Elucidative programming is a variant of literate programming. Literate programming represents the idea of structuring the program as fragments that are contained in an essay that documents the program understanding. Elucidative programming is...

متن کامل

AOPS: an abstraction-oriented programming system for literate programming

The practice of literate programming is not widespread because existing literate programming systems have some undesirable characteristics such as programming language and text processor dependence and lack of flexible tools for viewing and manipulation of the source file. This paper describes the literate programming system AOPS (Abstraction Oriented Programming System) which addresses both of...

متن کامل

A Literate Programming Tool for Concurrent Clean

Literate programming has attracted some interest in the functional programming community. This paper presents a prettyprinting algorithm used in a literate programming tool for the functional language Concurrent Clean, and discusses some of the issues involved in prettyprinting layout based languages. 1 Literate programming This section introduces the concept of literate programming for those w...

متن کامل

Literate Programming to Enhance Agile Methods

In this position paper, after explaining the essentials of literate programming, we argue that a literate programming style is consistent with the values espoused by agile software development; and that the application of literate programming in the context of an agile software development methodology is likely to enhance both the quality and lifespan of the final product.

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 1996